package com.computergames.server.server.client;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class TokenLoader {
    private static final String TOKEN_FILE_PATH = "D:\\try\\ComputerGamesServer\\ComputerGamesServer\\src\\main\\resources\\token.txt";
    public static String loadTokenFromFile() {
        StringBuilder tokenBuilder = new StringBuilder();
        try (BufferedReader reader = new BufferedReader(new FileReader(TOKEN_FILE_PATH))) {
            String line;
            while ((line = reader.readLine()) != null) {
                tokenBuilder.append(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return tokenBuilder.toString();
    }
}
